.PHONY:all
all:Server_Netcald.exe Client_Netcal.exe
Server_Netcald.exe:TcpServer.cpp 
	g++ -o $@ $^ -std=c++17 -ljsoncpp -g
Client_Netcal.exe:TcpClient.cpp 
	g++ -o $@ $^ -std=c++17 -ljsoncpp -g

# 加入软件部署概念
.PHONY:output
output:
	@mkdir output
	@mkdir -p output/bin
	@mkdir -p output/conf
	@mkdir -p output/log
	@cp Server_Netcald.exe output/bin
	@cp Client_Netcal.exe output/bin
	@cp test.conf output/conf
	@cp install.sh output/
	@cp uninstall.sh output/
	@tar czf output.tgz output

.PHONY:clean
clean:
	rm -rf Server_Netcald.exe Client_Netcal.exe output.tgz output